<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"> <style>
	.KEYW {color: #933;}
	.COMM {color: #bbb; font-style: italic;}
	.NUMB {color: #393;}
	.STRN {color: #393;}
	.REGX {color: #339;}
	.line {border-right: 1px dotted #666; color: #666; font-style: normal;}
	</style></head><body><pre><span class='line'>  1</span> <span class="COMM">/**
<span class='line'>  2</span>  * Constructs a new dot mark with default properties. Images are not typically
<span class='line'>  3</span>  * constructed directly, but by adding to a panel or an existing mark via
<span class='line'>  4</span>  * {@link pv.Mark#add}.
<span class='line'>  5</span>  *
<span class='line'>  6</span>  * @class Represents an image. Images share the same layout and style properties as
<span class='line'>  7</span>  * bars, in conjunction with an external image such as PNG or JPEG. The image is
<span class='line'>  8</span>  * specified via the {@link #url} property. The fill, if specified, appears
<span class='line'>  9</span>  * beneath the image, while the optional stroke appears above the image.
<span class='line'> 10</span>  *
<span class='line'> 11</span>  * &lt;p>TODO Restore support for dynamic images (such as heatmaps). These were
<span class='line'> 12</span>  * supported in the canvas implementation using the pixel buffer API; although
<span class='line'> 13</span>  * SVG does not support pixel manipulation, it is possible to embed a canvas
<span class='line'> 14</span>  * element in SVG using foreign objects.
<span class='line'> 15</span>  *
<span class='line'> 16</span>  * &lt;p>TODO Allow different modes of image placement: "scale" -- scale and
<span class='line'> 17</span>  * preserve aspect ratio, "tile" -- repeat the image, "center" -- center the
<span class='line'> 18</span>  * image, "fill" -- scale without preserving aspect ratio.
<span class='line'> 19</span>  *
<span class='line'> 20</span>  * &lt;p>See {@link pv.Bar} for details on positioning properties.
<span class='line'> 21</span>  *
<span class='line'> 22</span>  * @extends pv.Bar
<span class='line'> 23</span>  */</span><span class="WHIT">
<span class='line'> 24</span> </span><span class="NAME">pv.Image</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 25</span> </span><span class="WHIT">  </span><span class="NAME">pv.Bar.call</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 26</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 27</span> 
<span class='line'> 28</span> </span><span class="NAME">pv.Image.prototype</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">pv.extend</span><span class="PUNC">(</span><span class="NAME">pv.Bar</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'> 29</span> </span><span class="WHIT">    </span><span class="PUNC">.</span><span class="NAME">property</span><span class="PUNC">(</span><span class="STRN">"url"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 30</span> 
<span class='line'> 31</span> </span><span class="NAME">pv.Image.prototype.type</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"image"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 32</span> 
<span class='line'> 33</span> </span><span class="COMM">/**
<span class='line'> 34</span>  * The URL of the image to display. The set of supported image types is
<span class='line'> 35</span>  * browser-dependent; PNG and JPEG are recommended.
<span class='line'> 36</span>  *
<span class='line'> 37</span>  * @type string
<span class='line'> 38</span>  * @name pv.Image.prototype.url
<span class='line'> 39</span>  */</span><span class="WHIT">
<span class='line'> 40</span> 
<span class='line'> 41</span> </span><span class="COMM">/**
<span class='line'> 42</span>  * Default properties for images. By default, there is no stroke or fill style.
<span class='line'> 43</span>  *
<span class='line'> 44</span>  * @type pv.Image
<span class='line'> 45</span>  */</span><span class="WHIT">
<span class='line'> 46</span> </span><span class="NAME">pv.Image.prototype.defaults</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">pv.Image</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'> 47</span> </span><span class="WHIT">    </span><span class="PUNC">.</span><span class="NAME">extend</span><span class="PUNC">(</span><span class="NAME">pv.Bar.prototype.defaults</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'> 48</span> </span><span class="WHIT">    </span><span class="PUNC">.</span><span class="NAME">fillStyle</span><span class="PUNC">(</span><span class="KEYW">null</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 49</span> </span></pre></body></html>